package com.lonty.intelligence.service;

import com.lonty.intelligence.mapper.RoleMapper;
import com.lonty.intelligence.model.Role;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;

/**
 * @Author 陈璇
 * @Date 2020/4/16 11:47
 * @Version 1.0
 **/
@Service
public class RoleService {

    @Resource
    private RoleMapper roleMapper;

    /**
     * 保存权限
     * @param grade
     * @return
     */
    public boolean saveRole(Integer grade){
        Role role = new Role();
        role.setGrade(grade);
        role.setIsDel(0);
        return roleMapper.saveRole(role) > 0;
    }

}
